<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>数组</title>
	<script>
		arr = [1,56,200,6,43,87,3,5,55];
		function maxNum(arr){
			var max = 0;
			for (var i = 0; i< arr.length-1; i++) {
				max = arr[i]>max ? arr[i] :max;
			}
			return max;
		}
		max = maxNum(arr);
		alert(max);
	</script>
</head>
<body>
	
</body>
</html>